<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <head> <style type="text/css">
            html, 
            body
{
    height: 100%;
    background:#fff url(solenuvola.jpg) no-repeat center center;
    background-size:cover;
    box-shadow:inset 0 -1px 5px rgba(0,0,0,0.6);
}
        </style>
        <title>Event Creation
        </title>
    </head>
    <body>
         <div class="pure-u-1">
       <div class="email-content-header pure-g">
            <div class="pure-u-1">
                <h1 class="email-content-title"><i class="fa fa-comment"></i> Invite friends to your events, #{userBean.getName()}</h1>
                <p class="email-content-subtitle">
                    Here you can see all your events!
                </p>
                
            </div>
        </div>
        <p class="email-content-subtitle">
                    Here your personal events:
                </p>
                
            <p:dataTable var="e" value="#{EventBean.getEventByUser()}">
                <p:column headerText="Title">
                    <h:outputText value="#{e.title}" />
                </p:column>
                
                <p:column headerText="Date">
                    <h:outputText value="#{e.dataFormat()}" />
                </p:column>
                
                <p:column headerText="StartTime">
                    <h:outputText value="#{e.startTimeFormat()}" />
                </p:column>
                
                <p:column headerText="EndTime">
                    <h:outputText value="#{e.endTimeFormat()}" />
                </p:column>
 
                <p:column headerText="Place">
                    <h:outputText value="#{e.place}" />
                </p:column>
                
                 <p:column headerText="Weather">
                    <h:outputText value="#{e.weather}" />
                </p:column>
                                   
                <p:column headerText="# Guests">
                <h:form>
                        <p:commandButton class="pure-button button-warning" action="#{inviteBean.prepare(e)}" value="Invite friends!" ajax="true" update="@all"/>
                </h:form>
                </p:column>
         
           </p:dataTable>
   
    </div>
</div>
    </body>
</html>
